package com.wy.tranFile.pojo;

import lombok.Data;

@Data
public class Result {
    private String code;
    private Object data;
    private String message;

    public Result(String code, Object data, String message) {
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Result() {
    }

    public static Result success(Object data) {
        Result result = new Result();
        result.setCode("2000");
        result.setMessage("success");
        result.setData(data);
        return result;
    }
    public static Result fail() {
        Result result = new Result();
        result.setCode("9999");
        result.setMessage("fail");
        return result;
    }

}
